// components/method/method.js
Component({

  /**
   * 页面的初始数据
   */
  data: {
   current: 0
  },

  properties: {
    list: Array
  },

  methods: {
    change: function(e) {
      const {currentTarget:{dataset:{index: current, name, type}}} = e

      this.setData({
        current
      })

      this.triggerEvent('change', { current, name, type})
    }
  }
})